<template>
  <span :class="{
    right: item.state === '正确',
    error: item.state === '错误',
    undo: item.state === '未完成',
  }"> {{item.id}}: {{item.state}} </span>
</template>

<script>
export default {
  props: ["item"],
};
</script>

<style scoped>
.right {
  color: green;
}
.error {
  color: red;
}
.undo {
  color: #ccc;
}
</style>